package chat.service;

import common.model.chat.ChatRoom;
import common.model.chat.Message;
import common.model.result.Result;

import java.util.List;

public interface IChatService {
    void insertChatRoom(ChatRoom chatRoom);

    ChatRoom findActiveChatRoomByUserId(Long userIdLong);

    void updateChatRoom(ChatRoom chatRoom);

    Result getOnlineAdminId();

    boolean isChatRoomCreated(Long userId);

    List<ChatRoom> getActiveChatRooms();

    void insertMessage(Message newMessage);

    ChatRoom getChatRoom(Long fromId);

    Result getHistoryMessage(Long userId);

    Result closeChatRoom(Long userId);
}
